home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / 1.098 / Include / dev.h < prev    next >
C/C++ Source or Header  |  1991-04-18  |  2KB  |  64 lines

  1. /*
  2.  * dev.h --
  3.  *
  4.  *     Types, constants, and macros exported by the device module.
  5.  *
  6.  * Copyright 1985, 1988 Regents of the University of California
  7.  * Permission to use, copy, modify, and distribute this
  8.  * software and its documentation for any purpose and without
  9.  * fee is hereby granted, provided that the above copyright
  10.  * notice appear in all copies.  The University of California
  11.  * makes no representations about the suitability of this
  12.  * software for any purpose.  It is provided "as is" without
  13.  * express or implied warranty.
  14.  *
  15.  *
  16.  * $Header: /sprite/src/kernel/dev/RCS/dev.h,v 9.3 91/04/16 17:13:00 jhh Exp $ SPRITE (Berkeley)
  17.  */
  18.  
  19. #ifndef _DEV
  20. #define _DEV
  21.  
  22. #include <status.h>
  23. #ifdef KERNEL
  24. #include <devSyslog.h>
  25. #include <user/sysStats.h>
  26. #else
  27. #include <kernel/devSyslog.h>
  28. #include <sysStats.h>
  29. #endif
  30. #ifndef _SPRITETIME
  31. #include <spriteTime.h>
  32. #endif
  33.  
  34. /*
  35.  * The filesystem and the device module cooperate to translate from
  36.  * filesystem block numbers to disk addresses.  Hence, this simple
  37.  * type and the bytes per sector are exported.
  38.  */
  39. typedef struct Dev_DiskAddr {
  40.     int cylinder;
  41.     int head;
  42.     int sector;
  43. } Dev_DiskAddr;
  44. /*
  45.  *    DEV_BYTES_PER_SECTOR the common size for disk sectors.
  46.  */
  47. #define DEV_BYTES_PER_SECTOR    512
  48.  
  49. extern Time    dev_LastConsoleInput;
  50.  
  51. extern void Dev_ConsoleReset _ARGS_ ((int toConsole));
  52. extern void Dev_Init _ARGS_((void));
  53. extern void Dev_Config _ARGS_((void));
  54.  
  55. extern void Dev_GatherDiskStats _ARGS_((void));
  56. extern int Dev_GetDiskStats _ARGS_((Sys_DiskStats *diskStatArr,int numEntries));
  57. extern void Dev_RegisterConsoleCmd _ARGS_((int commandChar,
  58.     void (*proc)(ClientData clientData), ClientData clientData));
  59. extern void Dev_InvokeConsoleCmd _ARGS_((int commandChar));
  60. extern int Dev_KbdQueueAttachProc _ARGS_((int character, 
  61.     void (*proc)(ClientData clientData), ClientData clientData));
  62.  
  63. #endif /* _DEV */
  64.